package com.lce.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

//@Aspect
//@Component
public class MyAspect {

//    @Pointcut("execution(public * com.lce.service.impl.*.addUser1())")
//    public void point() {
//
//    }

    //@Pointcut("execution(public * com.lce.service..*.*(..))")
    public void point() {

    }

    //@Before("point()")
    public void test01() {
        System.out.println("切面执行---前置通知");
    }

    //@AfterReturning("point()")
    public void test02() {
        System.out.println("切面执行---后置通知");
    }

   // @After("point()")
    public void test03() {
        System.out.println("切面执行---最终通知");
    }

    //@AfterThrowing("point()")
    public void test04() {
        System.out.println("切面执行---抛异常通知");
    }

//    @Around("execution(public void com.lce.controller.UserController.addUser1())")
//    public void test05(ProceedingJoinPoint point) throws Throwable {
//        System.out.println("切面执行---环绕通知前");
//
//        point.proceed();
//
//        System.out.println("切面执行---环绕通知后");
//    }

}










